Repository navigation
chore: declare FunctionsToExport and add .gitattributes - #143
Merged
Merged
Conversation
FunctionsToExport was missing from the manifest entirely, which
PowerShell/the Gallery treat as wildcard ('*') - Microsoft's module
authoring guidance calls this an anti-pattern since it forces
PowerShell to execute the .psm1 to discover exports instead of
reading the static manifest, and the Gallery can't show an accurate
function list without importing. Added the explicit list, generated
from and verified identical to PiHoleShell.psm1's own
Export-ModuleMember list (76 functions, confirmed via
Test-ModuleManifest and a real Import-Module).
Also adds .gitattributes (* text=auto, with PiHoleShell.psd1
excluded since it's UTF-16LE). This makes line-ending normalization
explicit/portable across contributors rather than implicit in each
person's local core.autocrlf setting - note it does not by itself
silence the "LF will be replaced by CRLF" messages this session has
seen locally, since those come from this machine's own
core.autocrlf=true regardless of .gitattributes.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
❌ The last analysis has failed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
FunctionsToExportwas missing fromPiHoleShell.psd1entirely, which PowerShell/the Gallery treat as wildcard ('*') - Microsoft's module authoring guidance explicitly calls this an anti-pattern: it forces PowerShell to execute the.psm1to discover exports instead of reading the static manifest, and the Gallery can't show an accurate function list without importing. Added the explicit list, generated from and verified identical toPiHoleShell.psm1's ownExport-ModuleMemberlist.gitattributes(* text=auto, withPiHoleShell.psd1excluded since it's UTF-16LE with a BOM) - makes line-ending normalization explicit/portable across contributors instead of implicit in each person's localcore.autocrlfsetting. Note: this does not silence the "LF will be replaced by CRLF" messages seen locally throughout development, since those come from this machine's owncore.autocrlf=true, independent of.gitattributes- verified this directly rather than assume itTest plan
Test-ModuleManifestconfirms exactly 76 exported functions, matching the live moduleFunctionsToExportlist is set-identical toPiHoleShell.psm1'sExport-ModuleMemberlist (sorted comparison)Import-Module .\PiHoleShell.psd1(via the manifest, not the bare.psm1) succeeds and exposes all 76 functions correctly.psd1preserved as UTF-16LE with BOM (unchanged encoding) - confirmed via binary diff, not a text rewrite🤖 Generated with Claude Code